load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cdceval",
    srcs = [
        "cdc_prev.go",
        "compat.go",
        "doc.go",
        "expr_eval.go",
        "func_resolver.go",
        "functions.go",
        "parse.go",
        "plan.go",
        "validation.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl/cdceval",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ccl/changefeedccl/cdcevent",
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/jobs/jobspb",
        "//pkg/roachpb",
        "//pkg/security/username",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/descs",
        "//pkg/sql/execinfra",
        "//pkg/sql/isql",
        "//pkg/sql/parser",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/sql/rowenc",
        "//pkg/sql/sem/catconstants",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sem/volatility",
        "//pkg/sql/sessiondata",
        "//pkg/sql/sessiondatapb",
        "//pkg/sql/types",
        "//pkg/util/ctxgroup",
        "//pkg/util/hlc",
        "//pkg/util/log",
        "//pkg/util/timeutil",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_lib_pq//oid",
    ],
)

go_test(
    name = "cdceval_test",
    srcs = [
        "compat_test.go",
        "expr_eval_test.go",
        "func_resolver_test.go",
        "functions_test.go",
        "main_test.go",
        "plan_test.go",
        "validation_test.go",
    ],
    embed = [":cdceval"],
    deps = [
        "//pkg/base",
        "//pkg/ccl/changefeedccl/cdcevent",
        "//pkg/ccl/changefeedccl/cdctest",
        "//pkg/ccl/changefeedccl/changefeedbase",
        "//pkg/jobs/jobspb",
        "//pkg/keys",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/security/username",
        "//pkg/server",
        "//pkg/sql",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/randgen",
        "//pkg/sql/rowenc",
        "//pkg/sql/rowenc/keyside",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondata",
        "//pkg/sql/sessiondatapb",
        "//pkg/sql/types",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/encoding",
        "//pkg/util/hlc",
        "//pkg/util/json",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//require",
    ],
)
